﻿using Microsoft.AspNetCore.Routing;

namespace CleanArchitecture.Infrastructure.Interfaces
{
    /// <summary>
    /// Represents route publisher
    /// </summary>
    public interface IRoutePublisher
    {
        /// <summary>
        /// Register routes 
        /// DavidLee 2020/04/16 对已经使用传统mvc路由注册方法继续使用
        /// </summary>
        /// <param name="routeBuilder">Route builder</param>
        void RegisterRoutes(IRouteBuilder routeBuilder);

        /// <summary>
        /// Register routes
        /// DavidLee 2020/04/16 对已经使用传统mvc路由注册方法继续使用
        /// 前端(客户端Frontend)采用Endpoint方式注册路由，配合Column的UrlRoute实现路由重定向
        /// </summary>
        /// <param name="endpointRouteBuilder">Route builder</param>
        void RegisterEndpointRoutes(IEndpointRouteBuilder endpointRouteBuilder);
    }
}
